package com.yunyao.web.controller;

import com.yunyao.common.dto.ProjectSettlementPayNodeDto;
import com.yunyao.common.dto.SupplierSettlementPayNodeDto;
import com.yunyao.common.web.util.PageResult;
import com.yunyao.common.web.util.YResult;
import com.yunyao.framework.dto.project.ProjectSettlementPayNodeSaveDto;
import com.yunyao.framework.dto.supplier.SupplierSettlementPayNodeSaveDto;
import com.yunyao.framework.service.ProjectSettlementPayNodeService;
import com.yunyao.framework.service.SupplierSettlementPayNodeService;
import com.yunyao.framework.vo.posupply.PoSyupplyinfoVO;
import com.yunyao.framework.vo.project.ProjectSettlementPayNodeInfoVO;
import com.yunyao.framework.vo.project.ProjectSettlementPayNodeVO;
import com.yunyao.framework.vo.supplier.SupplierSettlementPayNodeVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@RequestMapping("/ptsettlement/paynode")
public class projectPayNodeController {
    @Autowired
    private ProjectSettlementPayNodeService supplierSettlementPayNodeService;
    @GetMapping("/list")
    public YResult<PageResult<ProjectSettlementPayNodeVO>> getList(ProjectSettlementPayNodeDto supplierSettlementPayNodeDto) {
        return supplierSettlementPayNodeService.pageList(supplierSettlementPayNodeDto);
    }
    @GetMapping("/info")
    public YResult<ProjectSettlementPayNodeInfoVO> getInfo(ProjectSettlementPayNodeDto projectSettlementPayNodeDto) {
        return supplierSettlementPayNodeService.getInfo(projectSettlementPayNodeDto);
    }
    @PostMapping("/save")
    public YResult<String> saveInfo(@RequestBody ProjectSettlementPayNodeSaveDto saveDto) {
        return supplierSettlementPayNodeService.saveInfo(saveDto);
    }
}
